import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import mheader from 'components/mheader/mheader'
import recommend from 'components/recommend/recommend'//推荐 
import rank from 'components/rank/rank'//排行
import singer from 'components/singer/singer'//歌手
import search from 'components/search/search'//搜索
import SingerDetail from '@/components/singer-detail/singer-detail'//歌手详情页
import Disc from '@/components/disc/disc'
import TopList from '@/components/top-list/top-list'
import UserCenter from '@/components/user-center/user-center'
import mv from '@/components/mv/mv' //mv详情页
Vue.use(Router)

export default new Router({ 
  linkActiveClass: 'active',
	mode:'history',
  routes: [
    {
    	path:"/",         //推荐 
    	redirect:"/recommend"//重定向
    },
	{
      path: '/recommend',
      component: recommend,
      children:[
        {path:':id',component:Disc}
      ]
    }
    ,{
      path:'/singer', //歌手
      component: singer,
			children:[
				{
					path:':id',
					component: SingerDetail
				}
			]
    },
	{
      path: '/rank', //排行
      component: rank ,
			children: [
				{
					path: ':id',
					component: TopList
				}
			]
    },{
      path: '/search',  //搜索
      component:search,
			children:[
				{
					path:':id',
					component: SingerDetail
				}
			] 
    },
		{
      path: '/user',  //用户界面
      component:UserCenter,
    },
	{
      path: '/ismv/:id',  //搜索
      component:mv	
    }
  ]
})
